///////////////////////////////////////////////////////////////////////////////
//                   ALL STUDENTS COMPLETE THESE SECTIONS
// Main Class File:  P1.java
// File:             Symbol.java
// Semester:         CS536 Spring 2013
//
// Author:           Sean Bauer, sbauer@cs.wisc.edu
// CS Login:         sbauer
// Lecturer's Name:  Hasti
//
///////////////////////////////////////////////////////////////////////////////

/**
 * Symbol class represents the symbols associated with a program being compiled.
 * Currently, this only means a simple string.
 * 
 * @author Sean Bauer
 */
public class Symbol {
	/**
	 * Constructor simply assigns the string type
	 * @param type 
	 * @throws NullPointerException if string is null
	 */
	public Symbol(String type) throws NullPointerException
	{
		if (type==null) throw new NullPointerException();
		type_ = type;
	}
	
	/**
	 * Accessor for this Symbol's type	
	 * 
	 * @return string type
	 */
	public String getType()
	{
		return type_;
	}
	
	/**
	 * Returns string representation of this Symbol
	 */
	public String toString()
	{
		return type_;
	}
	
	private String type_;
}
